package cm309.BookingSystem.FM;

import java.sql.Connection;
import java.sql.DriverManager;


public class factilitiesDao {
		static {
	
			try {
				Class.forName("org.h2.Driver");			
			} catch (ClassNotFoundException e){
				e.printStackTrace();
			}
}

		
		
		public static Connection getConnection() {
			try {
				Connection conn = DriverManager.getConnection("jdbc:h2:~/BookingSystem;MVCC=TRUE", "sa", "");
				conn.setAutoCommit(false);
				conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
				return conn;
		} catch (Exception e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}   
	}

}



		
			

	

